package cn.iocoder.yudao.module.project.dal.mysql.productioncodeorderedit;

import java.util.*;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.project.dal.dataobject.productioncodeorderedit.ProductionCodeOrderEditDO;
import org.apache.ibatis.annotations.Mapper;
import cn.iocoder.yudao.module.project.controller.admin.productioncodeorderedit.vo.*;

/**
 * 订单编辑-删除相关成品码 Mapper
 *
 * @author wangzuoyang
 */
@Mapper
public interface ProductionCodeOrderEditMapper extends BaseMapperX<ProductionCodeOrderEditDO> {

    default PageResult<ProductionCodeOrderEditDO> selectPage(ProductionCodeOrderEditPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ProductionCodeOrderEditDO>()
                .eqIfPresent(ProductionCodeOrderEditDO::getProductId, reqVO.getProductId())
                .likeIfPresent(ProductionCodeOrderEditDO::getName, reqVO.getName())
                .eqIfPresent(ProductionCodeOrderEditDO::getInternalCode, reqVO.getInternalCode())
                .eqIfPresent(ProductionCodeOrderEditDO::getOrderCode, reqVO.getOrderCode())
                .eqIfPresent(ProductionCodeOrderEditDO::getType, reqVO.getType())
                .betweenIfPresent(ProductionCodeOrderEditDO::getDownlineTime, reqVO.getDownlineTime())
                .eqIfPresent(ProductionCodeOrderEditDO::getDownlineStatus, reqVO.getDownlineStatus())
                .eqIfPresent(ProductionCodeOrderEditDO::getOperator, reqVO.getOperator())
                .eqIfPresent(ProductionCodeOrderEditDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(ProductionCodeOrderEditDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ProductionCodeOrderEditDO::getRecycleId));
    }

}